﻿using BCCommon;
using BCCommon.FreightEnums;
using BCDto.Common.Area;
using BCDto.Sim.Admin.Admin;
using System.Collections.Generic;

namespace BCService.Common.Area
{
    /// <summary>
    /// 省份
    /// </summary>
    public interface IProvinceService
    {
        /// <summary>
        /// 添加省份信息
        /// </summary>
        /// <param name="dto">省份信息</param>
        /// <param name="adminDto"></param>
        /// <returns></returns>
        bool Add(ProvinceRequestDto dto, AdminDto adminDto);
        /// <summary>
        /// 修改省份信息
        /// </summary>
        /// <param name="dto">省份信息</param>
        /// <param name="adminDto"></param>
        void Update(ProvincePutDto dto, AdminDto adminDto);
        /// <summary>
        /// 删除省份信息
        /// </summary>
        /// <param name="provinceCode">省份信息</param>
        void Delete(string provinceCode);
        /// <summary>
        /// 获取单个省份信息
        /// </summary>
        /// <param name="provinceId">省份Id</param>
        /// <returns></returns>
        ProvinceDto GetProvinceEntity(long provinceId);
        /// <summary>
        /// 获取单个省份信息
        /// </summary>
        /// <param name="provinceCode">省份编码</param>
        /// <returns></returns>
        ProvinceDto GetProvinceEntity(string provinceCode);
        /// <summary>
        /// 获取分页省份信息
        /// </summary>
        /// <param name="provinceCode">省份编码</param>
        /// <param name="index">起始页</param>
        /// <param name="size">每页数据条数</param>
        /// <returns></returns>
        PageableList<ProvinceDto> GetProvinces(string provinceCode,int index, int size);
        /// <summary>
        /// 修改省份议价
        /// </summary>
        /// <param name="provinceCode">省份编码</param>
        /// <param name="businessType">业务类型</param>
        /// <param name="isNegotiatedPrice">需要议价</param>
        /// <returns></returns>
        void UpdateProvinceNegotiatedPrice(string provinceCode, FreightBusinessType businessType, bool isNegotiatedPrice);
        /// <summary>
        /// 获取所有省市
        /// </summary>
        /// <returns></returns>
        IEnumerable<ProvinceCityDto> GetAllProvinces();
        /// <summary>
        /// 更改省份坐标
        /// </summary>
        /// <param name="tableName">表名</param>
        /// <param name="provinceCode">省份编码</param>
        /// <param name="longitude">经度</param>
        /// <param name="latitude">纬度</param>
        /// <returns></returns>
        void UpdateCoordinate(string tableName, string provinceCode, double longitude, double latitude);

        /// <summary>
        /// 更新省份信息
        /// </summary>
        /// <param name="editer">编辑人</param>
        /// <param name="provinceCode">省份编码</param>
        /// <param name="provinceName">省份名称</param>
        /// <param name="longitude">经度</param>
        /// <param name="latitude">纬度</param>
        /// <param name="batchNo">批号</param>
        /// <returns></returns>
        ProvinceDto UpdateProvince(string editer, string provinceCode, string provinceName, double longitude, double latitude, string batchNo);

        /// <summary>
        /// 不存在新地图信息插入未匹配上的数据
        /// </summary>
        /// <param name="batchNo">批号</param>
        bool UpdateIsEnabled(string batchNo);
    }
}
